﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageSERIX.Master" AutoEventWireup="true"
    CodeBehind="IndicadoresAcao.aspx.cs" Inherits="SERIX.IndicadoresAcao" Title="Indicadores de Ação" %>

<%@ Register Src="Controles/Navegador.ascx" TagName="Navegador" TagPrefix="uc1" %>
<%@ Register Src="Controles/lovGenerica.ascx" TagName="lovGenerica" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
        <tr>
            <td class="secao_titulo" style="width: 284px">
                Indicadores de Ação<hr class="linhaHorizontal" style="width: 740px" />
            </td>
        </tr>
    </table>
    <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
        <tr>
            <td align="left" class="barra" style="height: 16px; background-color: white-Smoke;">
                <asp:Button ID="btnNovo" runat="server" Font-Bold="True" OnClick="btnNovo_Click"
                    TabIndex="1" Text="Novo" UseSubmitBehavior="False" Width="78px" />
            </td>
        </tr>
    </table>
    <asp:UpdatePanel ID="UpdatePanelFiltro" runat="server">
        <ContentTemplate>
            <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
                <tr>
                    <td align="center" class="grid_titulo">
                        <span style="color: #FFFFFF">Programa: </span>
                        <asp:TextBox ID="txtNomePrograma" runat="server" Columns="40" MaxLength="60" 
                            Enabled="False"></asp:TextBox>
                        <uc2:lovGenerica ID="LovProgramas1" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td align="center" class="grid_titulo">
                        <span style="color: #FFFFFF">Ação: </span>
                        <asp:DropDownList ID="ddlAcoes" runat="server" DataSourceID="SqlAcoesPrograma" DataTextField="DSC_ACAO"
                            DataValueField="IDT_ACAO" OnPreRender="ddlAcoes_PreRender">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlAcoesPrograma" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT IDT_ACAO, DSC_ACAO FROM SERIX.SRX_ACOES_PROGRAMAS WHERE IDT_PROG = :PARAM ORDER BY DSC_ACAO">
                            <SelectParameters>
                                <asp:Parameter Name="PARAM" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        &#160;&#160;<asp:Button ID="btnPequisar" runat="server" Font-Bold="True" OnClick="btnPequisar_Click"
                            TabIndex="5" Text="Pesquisar" Width="80px" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Panel ID="PainelDadosMestre" runat="server">
        <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
            <tr>
                <td align="center" class="grid_mestre">
                    <span style="color: #000000">Programa: </span>
                    <asp:Label ID="lblPrograma" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center" class="grid_mestre">
                    <span style="color: #000000">Ação: </span>
                    <asp:Label ID="lblAcao" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
        <tr>
            <td align="left" style="color: #000000">
                <asp:Label ID="lblFiltro" runat="server" CssClass="filtro" TabIndex="-1" Text="Filtro: "></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                <asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" CssClass="grid"
                    OnRowDataBound="gridView_RowDataBound" EmptyDataText="Nenhum registro encontrado.">
                    <AlternatingRowStyle CssClass="row_alter" />
                    <Columns>
                        <asp:BoundField DataField="IDT_IND" HeaderText="IDT" Visible="False" />
                        <asp:BoundField DataField="IDT_PROG" HeaderText="IDT_PROG" Visible="False" />
                        <asp:BoundField DataField="IDT_ACAO" HeaderText="IDT_ACAO" Visible="False" />
                        <asp:BoundField DataField="ROT_IND" HeaderText="Abrev." ItemStyle-Width="120px">
                            <ItemStyle Width="120px"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="DSC_IND" HeaderText="Indicador" ItemStyle-Width="700px">
                            <ItemStyle Width="700px"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Vínculo">
                            <ItemTemplate>
                                <asp:Label ID="lblVinculo" runat="server" OnPreRender="lblVinculo_PreRender" Text='<%# Bind("TPO_VINC") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Width="200px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="DSC_CLA_IND" HeaderText="Categoria" ItemStyle-Width="320px">
                            <ItemStyle Width="320px"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField FooterText="Detalhes" HeaderText="Detalhes" ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:HyperLink ID="Detalhes_HyperLink" runat="server" ImageUrl="Imagens/botoes/Detail.png">Detalhes</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField FooterText="Editar" HeaderText="Editar" ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:HyperLink ID="Editar_HyperLink" runat="server" ImageUrl="Imagens/botoes/Edit.png">Editar</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField FooterText="Excluir" HeaderText="Excluir" 
                            ItemStyle-Width="70px" Visible="False">
                            <ItemTemplate>
                                <asp:HyperLink ID="Excluir_HyperLink" runat="server" ImageUrl="Imagens/botoes/Delete.png">Excluir</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Opções">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlOpcoes" runat="server" AutoPostBack="True" Height="17px"
                                    OnSelectedIndexChanged="ddlOpcoes_SelectedIndexChanged" Width="141px">
                                    <asp:ListItem Selected="True" Value="  ">
                                    </asp:ListItem>
                                    <asp:ListItem>Medidas</asp:ListItem>
                                    <asp:ListItem>Associações</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataRowStyle CssClass="emptyrow" />
                    <FooterStyle CssClass="footer" />
                    <HeaderStyle CssClass="header" />
                    <PagerStyle CssClass="pager" />
                    <RowStyle CssClass="row" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                <uc1:Navegador ID="Navegador1" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
            </td>
        </tr>
    </table>
</asp:Content>
